With development of the field of mobile technologies, access by a mobile terminal to the mobile Internet to acquire a corresponding resource has become an important application of a mobile terminal. When a mobile terminal accesses the mobile Internet, various possible manners may be used for access, where a two-dimensional code, as an important entrance to the mobile Internet, refers to a readable bar code that is developed based on a one-dimensional bar code and has another dimension. It uses a black and white rectangular pattern to represent binary data, and is essentially a character string. After code scanning software in a mobile terminal scans and parses a two-dimensional code image successfully, the character string can be obtained, and if it is found that the character string is a uniform resource locator (URL), this URL may be opened by using a browser.
URLs may be classified into mobile application program download URLs and ordinary URLs. The mobile application program download URLs are usually application package file (APK) download URLs, where an APK is an Android application package file, and is a format of an application program installation file in an Android operating system. A web page is displayed after an ordinary URL is opened, while an APK application program is downloaded after an APK download URL is opened, where the application program may be a malicious program, which threatens security of a mobile terminal of a user. Therefore, it is necessary to perform URL security check before a URL of a two-dimensional code is opened, to block a malicious website and a malicious program, thereby protecting security of a mobile terminal of a user.
At present, a few pieces of popular two-dimensional code scanning software provide a capability of checking security of a two-dimensional code website. However, none of the current pieces of two-dimensional code scanning software has a capability of checking security of an APK download URL, and only after an APK is downloaded to a mobile phone can it be detected whether the APK is a malicious program. This manner not only consumes a long time for downloading, but also consumes network traffic of a user. After downloaded to a mobile phone, malicious software may be easily installed on the mobile phone because of a misoperation of a user, thereby threatening security of a mobile phone of the user.